package unimelb.discussiontracker.twitter.data.dao.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

import unimelb.discussiontracker.twitter.data.dao.IUserDao;
import unimelb.discussiontracker.twitter.data.entity.UserEntity;

@Repository
public class UserDao extends GenericDataAccessObject<UserEntity> implements IUserDao {

    @Override
    public UserEntity findByName(String name) {
        final Map<String, Object> queryParams = new HashMap<String, Object>();
        queryParams.put("name", name);
        return this.runSingleResultNamedQuery("User.FindByName", queryParams, null);
    }
}
